package test_junit_merchant.MarketSold;

import org.openqa.selenium.By;
import util.BaseDriver;

public class CarClasses extends BaseDriver {

    private CarClasses(){}

    private static CarClasses instance=new CarClasses();

    public static CarClasses getInstance(){
        return instance;
    }




    //切换菜单到市场营销->车型定义->常用车型定义
    public void switchMenu() throws InterruptedException {
        Thread.sleep(200);
        driver.findElement(By.xpath("//ul[@id='side-menu']/li[6]/a/span")).click();
        Thread.sleep(1000);
        driver.findElement(By.linkText("车型定义")).click();
        driver.findElement(By.linkText("常用车型定义")).click();
    }

    //选择车型保存
    public void selectCar() throws InterruptedException {
        Thread.sleep(3000);
        driver=driver.switchTo().frame(2);
        Thread.sleep(5000);
        driver.findElement(By.linkText("AC Schnitzer")).click();
        driver.findElement(By.linkText("ALPINA")).click();
        driver.findElement(By.cssSelector("input[type=\"button\"]")).click();
        Thread.sleep(1000);
        driver.findElement(By.linkText("确定")).click();
    }


}
